package com.ed100.sass.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ed100.sass.service.AccountService;
import com.ed100.sass.util.redis.RedisUtils;

@Controller
@RequestMapping("vue")
public class VueController {

	@Autowired
	private AccountService accountService;
	
	@Autowired
	private RedisUtils redisUtil;
	
	@RequestMapping("")
	public String index() {
		
		return "vue/index";
	}
	
	@RequestMapping("redis_cache")
	public @ResponseBody Object redisCache() {
		redisUtil.set("allAccount",accountService.queryAll());
		return redisUtil.get("allAccount");
	}
}
